package com.weigang.flowable.Dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import java.util.Date;

@Data
public class HolidayRequest {
    private String id;
    private String processInstanceId;

    private Date createTime;

    private Date updateTime;

    private String applicant;
    private Integer days;
    private String status;

    @JsonIgnore
    public Date getCreateTime() { return createTime; }

    @JsonIgnore
    public Date getUpdateTime() { return updateTime; }

    // === 可选：如果需要展示格式化时间 ===
    public String getCreateTimeFormatted() {
        if (createTime != null) {
            return new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(createTime);
        }
        return null;
    }

    public String getUpdateTimeFormatted() {
        if (updateTime != null) {
            return new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(updateTime);
        }
        return null;
    }
}
